import request from "@/api/request";
import { type AxiosRequestConfig } from "axios";
import { type DeepRequired } from "../../interface";

/**
 * /file-detail
 */
export function postFileDetail(params: PostFileDetailParams, input?: PostFileDetailInput, config?: AxiosRequestConfig) {
    const paramsInput = {
        projectNumber: params.projectNumber,
        title: params.title,
        remark: params.remark,
        typeId: params.typeId,
    };
    return request.post<DeepRequired<any>>(`/file-detail`, input, {
        params: paramsInput,
        ...config,
    });
}

export interface PostFileDetailParams {
    projectNumber: string;
    title: string;
    remark?: string;
    typeId: number;
}

export interface PostFileDetailInput {
    file: File;
}
